// var i;
// var AL_GAME_HUA_GoldBar = require("./AL_GAME_HUA_GoldBar");
// var AL_GAME_HUA_StarBar = require("./AL_GAME_HUA_StarBar");
// var AL_GAME_HUA_VitBar = require("./AL_GAME_HUA_VitBar");
// var u = cc._decorator;
// var p = u.ccclass;
// var f = u.property;
// var d =
//     (u.menu,
//     (function (e) {
//         function t() {
//             var t = (null !== e && e.apply(this, arguments)) || this;
//             t.com_gold_bar = null;
//             t.com_star_bar = null;
//             t.com_vit_bar = null;
//             return t;
//         }
//         __extends(t, e);
//         t.prototype.onLoad = function () {
//             this.node.scale = Math.min(cc.winSize.width / cc.view.getDesignResolutionSize().width, 1);
//         };
//         t.prototype.yincang_suoyou = function () {
//             this.com_gold_bar.node.active = !1;
//             this.com_star_bar.node.active = !1;
//             this.com_vit_bar.node.active = !1;
//         };
//         __decorate([f(AL_GAME_HUA_GoldBar.default)], t.prototype, "com_gold_bar", void 0);
//         __decorate([f(AL_GAME_HUA_StarBar.default)], t.prototype, "com_star_bar", void 0);
//         __decorate([f(AL_GAME_HUA_VitBar.default)], t.prototype, "com_vit_bar", void 0);
//         return __decorate([p], t);
//     })(cc.Component));
// exports.default = d;

// 引入所需模块
const AL_GAME_HUA_GoldBar = require("./AL_GAME_HUA_GoldBar");
const AL_GAME_HUA_StarBar = require("./AL_GAME_HUA_StarBar");
const AL_GAME_HUA_VitBar = require("./AL_GAME_HUA_VitBar");

// Cocos Creator 装饰器
const { ccclass, property } = cc._decorator;

/**
 * @class
 * @description 这是一个用于处理金、星、体力条的组件类
 */
@ccclass
class MyComponent extends cc.Component {
    /** @type {AL_GAME_HUA_GoldBar} */
    @property(AL_GAME_HUA_GoldBar.default)
    com_gold_bar = null;

    /** @type {AL_GAME_HUA_StarBar} */
    @property(AL_GAME_HUA_StarBar.default)
    com_star_bar = null;

    /** @type {AL_GAME_HUA_VitBar} */
    @property(AL_GAME_HUA_VitBar.default)
    com_vit_bar = null;

    /**
     * @description 当组件加载时调用，将节点缩放到适应当前窗口宽度
     */
    onLoad() {
        this.node.scale = Math.min(cc.winSize.width / cc.view.getDesignResolutionSize().width, 1);
    }

    /**
     * @description 隐藏所有的条组件
     */
    yincang_suoyou() {
        this.com_gold_bar.node.active = false;
        this.com_star_bar.node.active = false;
        this.com_vit_bar.node.active = false;
    }
}

exports.default = MyComponent;
